package com.googlecode.archimedes.filegen.model;

import java.util.ArrayList;
import java.util.Collection;

/**
 * <p>
 * Represents a value of an Enumeration
 * </p>
 * 
 * <p>Created: Feb 17, 2006</p>
 * 
 * @author Erik Gustavson
 * @version $Id: EnumeratedValue.java 2023 2006-02-18 01:16:42 +0000 (Sat, 18 Feb 2006) erik $
 */
public class EnumeratedValue extends AbstractAsset implements Comparable<EnumeratedValue> {

    private String name;
    private String displayName;

    /**
     * Returns the displayName.
     *
     * @return String value of displayName
     */
    public String getDisplayName() {
        return displayName;
    }

    /**
     * Sets the displayName
     * @param displayName The displayName to set.
     */
    public void setDisplayName(String displayName) {
        this.displayName = displayName;
    }

    /**
     * Returns the name.
     *
     * @return String value of name
     */
    public String getName() {
        return name;
    }

    /**
     * Sets the name
     * @param name The name to set.
     */
    public void setName(String name) {
        this.name = name;
    }

    /** 
     * @see com.tps.filegen.model.Asset#getSubordinateAssets()
     */
    public Collection<? extends Asset> getSubordinateAssets() {
        //no subordinate assets - just return an empty list
        return new ArrayList<Asset>();
    }

    /** 
     * @see java.lang.Comparable#compareTo(T)
     */
    public int compareTo(EnumeratedValue o) {
        return this.name.compareTo(o.name);
    }
}
